﻿#include "dialog.h"
#include "ui_dialog.h"

Dialog::Dialog(QWidget *parent)
    : QDialog(parent)
    , ui(new Ui::Dialog)
{
    ui->setupUi(this);

//    ImgButton* button1 = new ImgButton(this);
//    button1->setText("Button 1");
//    button1->setButtonColor(QColor("#ff5722")); // 设置按钮颜色
//    button1->setButtonIcon(QPixmap(":/img/passwordLogin.png"), Qt::AlignLeft); // 设置按钮图片
//    button1->setTextColor(Qt::white); // 设置字体颜色
//    button1->setBackgroundOpacity(0.8); // 设置背景透明度

//    ImgButton* button2 = new ImgButton(this);
//    button2->setText("Button 2");
//    button2->setButtonColor(QColor("#ffb800"));
//    button2->setButtonIcon(QPixmap(":/img/del.png"), Qt::AlignLeft); // 设置按钮图片
//    button2->setTextColor(Qt::black);
//    button2->setBackgroundOpacity(1.0);


//    // 将按钮添加到布局中
//    QVBoxLayout* layout = new QVBoxLayout(this);
//    layout->addWidget(button1);
//    layout->addWidget(button2);
//    setLayout(layout);

    ui->pushButton->setText("按钮 1");
    ui->pushButton->setButtonColor(QColor("#ff5722"));
    ui->pushButton->setButtonIcon(QPixmap(":/img/passwordLogin.png"), Qt::AlignLeft);
    ui->pushButton->setTextColor(Qt::white);
    ui->pushButton->setBackgroundOpacity(0.8); // 设置背景透明度

    ui->pushButton_2->setText("按钮 2");
    ui->pushButton_2->setButtonColor(QColor("#ffb800"));
    ui->pushButton_2->setButtonIcon(QPixmap(":/img/del.png"), Qt::AlignLeft);
    ui->pushButton_2->setTextColor(Qt::white);
    ui->pushButton_2->setBackgroundOpacity(1.0); // 设置背景透明度

}

Dialog::~Dialog()
{
    delete ui;
}

